use clap::Parser;
use std::path::PathBuf;

/// 将Visual Studio项目转换为CMake项目的工具
#[derive(Parser, Debug)]
#[clap(author, version, about, long_about = None)]
pub struct Args {
    /// 输入目录，包含Visual Studio解决方案或项目文件
    #[clap(short, long, value_parser, default_value = ".")]
    pub input: PathBuf,

    /// 输出目录，将生成CMake项目文件
    #[clap(short, long, value_parser, default_value = "./cmake_output")]
    pub output: PathBuf,

    /// Qt安装目录路径（可选）
    #[clap(long, value_parser)]
    pub qt_dir: Option<String>,

    /// 日志级别 (off, error, warn, info, debug, trace)
    #[clap(short, long, value_parser, default_value = "info")]
    pub log_level: String,

    /// 在出现警告的情况下也视为成功（不以非零状态退出）
    #[clap(long)]
    pub ignore_warnings: bool,
    
    /// 显示详细警告信息
    #[clap(short = 'W', long)]
    pub show_warnings: bool,
    
    /// 显示进度条
    #[clap(short = 'p', long)]
    pub show_progress: bool,

    /// 静默模式，不显示任何输出（优先级高于其他显示选项）
    #[clap(short, long)]
    pub quiet: bool,
    
    /// 生成VS Code C/C++插件的c_cpp_properties.json配置文件
    #[clap(short = 'c', long)]
    pub generate_cpp_properties: bool,
    
    /// 生成clangd配置文件(.clangd)
    #[clap(short = 'd', long)]
    pub generate_clangd: bool,
    
    /// clangd配置模板文件路径（可选）
    #[clap(long, value_parser)]
    pub clangd_template: Option<PathBuf>,
}